import Vue from "vue";
import VueRouter from "vue-router";
import generateRoute from './generateRoute'

// 静态路由
import staticRoutes from '@/router/staticRoutes'

// 动态路由
import dynamicRoutes from '@/router/dynamicRoutes'

Vue.use(VueRouter);

const routes = [
  // {
  //   path:'/',
  //   redirect: '/login'
  // },
  
  // {
  //   path: "/login",
  //   name: "login",
    
  //   component: () =>
  //     import(/* webpackChunkName: "login" */ "../pages/login"),
  // },
  // {
  //   path: "/home",
  //   name: "home",
    
  //   component: () =>
  //     import(/* webpackChunkName: "Home" */ "../pages/Home"),

  // },

  // // 404页面
  // {
  //   path: "*",
  //   component: () =>
  //     import(/* webpackChunkName: "login" */ "../pages/page404"),
  // },

  {
    path:'/',
    redirect:'/welcome'
  },
  ...staticRoutes
  // dynamicRoutes

];

const router = new VueRouter({
  routes,
});

export default router;
